
class Student{
    private String name;
    private double grade;

    public Student(String name, double grade) {
        this.name = name;
        this.grade = grade;
    }
public Student(){

}
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getGrade() {
        return grade;
    }

    public void setGrade(double grade) {
        this.grade = grade;
    }
    public void speak(){
        System.out.println("姓名："+name+","+"成绩："+grade);
    }
}

public class Test1 {
    public static void main(String[] args) {
        Student s1 = new Student();
        Student s2=new Student("李四",100.0);
       s1.setName("张三");
       s1.getName();
       s1.setGrade(99.0);
       s1.getGrade();
        s1.speak();
        s2.speak();

    }
}

